feat(gui): drag the divider to resize the two panes - #40
Merged
Conversation
The panes were a fixed 3:2, which is a guess about somebody else's screen. On a narrow window the right pane's tab strip runs out of room and clips the last tab - "Diagnostics (2)" was the one that prompted this - and there was nothing to do about it: the space between the lists was a gap, not a handle. It is a handle now. Six pixels, full height, the toolbars' muted line at rest and the panel border's burgundy while held, so a drag in progress is visible rather than inferred. The ratio is clamped to 0.15..0.85 in both the live drag and the settings parser. A pane dragged to zero takes the divider with it, and then neither pane can be recovered - so an out-of-range value in `settings.ini` reads as the default rather than as a preference somebody chose, the same policy `drag_scroll_speed` already applies. It is written to `settings.ini` on RELEASE, not on every pointer move: the drag emits a message per frame and the settings are a file. Nothing new was needed to carry it. `app.cursor` and `app.window` were already tracked, `mouse_area` was already imported, and `PointerAt` was already ambient - which matters, because resizing the furniture must not disarm a two-click confirmation armed on a row. Tested through the real message loop: the pointer alone does not resize, a grab makes it follow, both clamps hold at the edges, release stops the drag and hands the value to the preferences, and a move after release is inert again.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The panes were a fixed 3:2, which is a guess about somebody else's screen. On a narrow window the right pane's tab strip runs out of room and clips the last tab - "Diagnostics (2)" was the one that prompted this - and there was nothing to do about it: the space between the lists was a gap, not a handle.
Now it is a handle
Six pixels, full height, the toolbars' muted line at rest and the panel border's burgundy while held, so a drag in progress is visible rather than inferred.
Clamped in both places
The ratio is held to
0.15..0.85in the live drag and in the settings parser. A pane dragged to zero takes the divider with it, and then neither pane can be recovered - so an out-of-range value insettings.inireads as the default rather than as a preference somebody chose. That is the policydrag_scroll_speedalready applies, reused rather than reinvented.It is written to
settings.inion release, not on every pointer move: the drag emits a message per frame and the settings are a file.Nothing new was needed to carry it
app.cursorandapp.windowwere already tracked,mouse_areawas already imported, andPointerAtwas already inis_ambient- which matters, because resizing the furniture must not disarm a two-click confirmation armed on a row.SplitGrabjoins it for the same reason.Tested through the real message loop
Plus a settings round-trip that refuses
0,1,0.05,0.99,-1,abcand the empty string.254 GUI tests, workspace green, clippy clean on the pinned 1.94.1.